let mainPage = document.querySelector("#mainPage");
let more = mainPage.querySelector("#header .mui-icon-bars");
let headerMenu = mainPage.querySelector(".header-menu");
more.onclick = () => {
    headerMenu.classList.toggle("open");
}
let muiTableView = document.querySelectorAll("#login .mui-table-view")
muiTableView[0].onclick = () => {
    location.href = `City-Travel-login.html`
}
let phone = location.search.split("phone=")[1].split("?")[0]
let num = location.search.split("status=")[1]
if(num == 1) {
    muiTableView[0].classList.add("none")
    muiTableView[1].classList.remove("none")
    axios.get("http://localhost:3001/mine_message",{
        params: {
            phone
        }
    }).then(res => {
        console.log(res.data.data[0]);
        let item = res.data.data[0]
        muiTableView[1].innerHTML = `
            <li class="mui-table-view-cell mui-media">
                <a href="javascript:;">
                    <img class="mui-media-object mui-pull-left" src="${item.user_img}">
                    <div class="mui-media-body">
                        <p class="info-title">尊敬的会员</p>
                        <p class="info-levels">
                            <span class="info-level"><i></i>${item.user_card_type==0?'普卡':"黄金卡"}</span>
                            <span class="info-level">去认证</span>
                        </p>
                    </div>
                    <img src="images/City-Travel-mine/arrow-right.png" alt="" class="arrow-right">
                </a>
            </li>
        `
    }).catch(err => {
        console.log(err);
    })
}
